﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QingzimaDB;

namespace QingzimaLogicModel
{
   public class PingJiaLM:JichuLM
    {
        #region 属性区
        /// <summary>
        /// 评价
        /// </summary>
        public string PingJia { get; set; }
        /// <summary>
        /// 用户的KEY
        /// </summary>
        public string YonghuKey { get; set; }
        /// <summary>
        /// 用户名称
        /// </summary>
        public string YonghuMingcheng { get; set; }
        /// <summary>
        /// 产品的KEY
        /// </summary>
        public string ChanpinKey { get; set; }
        /// <summary>
        /// 产品名称
        /// </summary>
        public string ChanpinMingcheng { get; set; }
        #endregion

        #region 构造区
        public PingJiaLM()
        {

        }

        public PingJiaLM(PingJiaDB dbModel)
        {
            ID = dbModel.ID;
            Key = dbModel.Key;
            CreatedTime = dbModel.CreatedTime;
            PingJia = dbModel.PingJia;
            YonghuKey = dbModel.YonghuKey;
            YonghuMingcheng = dbModel.YonghuMingcheng;
            ChanpinKey = dbModel.ChanpinKey;
            ChanpinMingcheng = dbModel.ChanpinMingcheng;
        }
        #endregion

        #region 方法区
        public void Save()
        {
            PingJiaDB dbModel = new PingJiaDB();
            dbModel.ID = ID;
            dbModel.Key = Key;
            dbModel.CreatedTime = CreatedTime;
            dbModel.PingJia = PingJia;
            dbModel.YonghuKey = YonghuKey;
            dbModel.YonghuMingcheng = YonghuMingcheng;
            dbModel.ChanpinKey = ChanpinKey;
            dbModel.ChanpinMingcheng = ChanpinMingcheng;
            dbModel.Save();
        }
        #endregion
    }
}
